#include "Queue.h"
/* arguments */
int rear = -1;
int front = -1;

Queue_element queue[MAX_QUEUE_SIZE];

void addq(Queue_element item)
{
	rear = (rear + 1) % MAX_QUEUE_SIZE;
	if(front == rear) 
	{
		printf("The Circular_Queue is full.\n");
		rear =  (rear != 0) ? (rear - 1) : (MAX_QUEUE_SIZE - 1) ;
		return;
	}
	queue[rear] = item;

}

Queue_element deleteq()
{
	if(front == rear)
	{
		printf("The Circular_Queue is empty. Return Value is 0(Zero)\n");
		return;
	}
	front = (front + 1) % MAX_QUEUE_SIZE;
	return queue[front];
}